
package main.java.FSMDE.validation.rules;

import main.java.ERMDE.validation.ValidationType;
import main.java.FSMDE.models.Component;
import main.java.FSMDE.models.Diagram;
import main.java.FSMDE.models.Interface;
import main.java.FSMDE.validation.IValidationEntry;



public class ComplexComponentShouldHaveComponentsValidationEntry implements
		IValidationEntry {

	private Diagram diagram;
	private Interface fsminterface;
	private Component component;
	
	ComplexComponentShouldHaveComponentsValidationEntry(Diagram diagram, Interface inface, Component component){
		this.diagram = diagram;
		this.fsminterface = inface;
		this.component = component;
	}

	@Override
	public Diagram getDiagram() {
		return this.diagram;
	}

	@Override
	public String getMessage() {
		return String.format("Complex Component '%s' in Interface '%s' does not have any component assigned.", this.component.toString(), this.fsminterface.toString());
	}

	@Override
	public ValidationType getType() {
		return ValidationType.WARNING;
	}

}
